package com.cnhis.cloudhealth.clidoctorweb.visitdoctorparameter;

import javax.ws.rs.FormParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.jboss.resteasy.logging.Logger;
import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Reference;
import com.cnhis.cloudhealth.clinical.clidoctor.visitdoctorparameter.service.IVisitDoctorParameter;
import com.cnhis.cloudhealth.commons.Mappers.ModelVo;
import java.util.HashMap;
@Path("visitdoctorparameter")
@Component
public class VisitDoctorParameterRest {
	Logger log = Logger.getLogger(VisitDoctorParameterRest.class); 
	@Reference
	private IVisitDoctorParameter parameters;
	
	/**752
	 * 就诊参数设置中对应 医生诊室
	 * @return
	 * @throws Exception
	 */
	
	@POST
	@Path("queryphysicianoffice")
	@Produces({ MediaType.APPLICATION_JSON })
	public ModelVo queryPhysicianOffice()throws Exception{
		HashMap hs = new HashMap();
		return parameters.queryPhysicianOffice(hs);
	}
	/**753
	 * 就诊参数设置中对应 就诊医生
	 * BCE03 医师姓名
	 * BCE02 工号
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings("unchecked")
	@POST
	@Path("queryclinicaldoctor")
	@Produces({ MediaType.APPLICATION_JSON })
	public ModelVo queryClinicalDoctor(@FormParam("BCE03") String BCE03,@FormParam("BCE02") String BCE02,@FormParam("currPage") int currPage,@FormParam("pageSize") int pageSize)throws Exception{
		HashMap hs = new HashMap();
		hs.put("BCE03", BCE03);
		hs.put("BCE02", BCE02);
		return parameters.queryClinicalDoctor(hs, (currPage-1)*pageSize, pageSize);
		
	}
	/**751
	 * 门诊医生工作站就诊参数设置对应的接诊范围
	 * @return
	 * @throws Exception
	 */
	@POST
	@Path("clinicalreceptionregion")
	@Produces({ MediaType.APPLICATION_JSON })
	public ModelVo clinicalReceptionRegion()throws Exception{
		return parameters.clinicalReceptionRegion();
	}
	/**2017
	 * 门诊医生工作站参数设置中，存储对应第一次需要自动添加的收费项目
	 * @return
	 * @throws Exception
	 * 
	 */
	@POST
	@Path("autoadditem")
	@Produces({ MediaType.APPLICATION_JSON })
	public ModelVo autoAddItem()throws Exception{
		return parameters.autoAddItem();
	}
	/* ScriptId(1763) */
	/* Description(判断病人就诊时间是否在有效期内) */
	/**
	 * 
	 * @param VAC01
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings("unchecked")
	@POST
	@Path("checkpatientvisitdoctortime")
	@Produces({ MediaType.APPLICATION_JSON })
	public ModelVo checkPatientVisitDoctorTime(@FormParam("VAC01") int VAC01)throws Exception{
		HashMap map = new HashMap();
		map.put("VAC01", VAC01);
		return parameters.checkPatientVisitDoctorTime(map);
	}
}
